five-year-old had accidentally been locked in by grandma .
she ran to the window to shout her but fell between the metal slats .
neighbours used piece of pipe and other items to take weight off neck .
emergency crews arrived 30 minutes later to free her from railings .